home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
.net 2002 March
/
DotNetMagazine-Issue107-Coverdisc-NET107-02-03-PCMac.bin
/
pc
/
PC Software
/
free_browsing
/
DavesQckSearchDbar3-14
/
dqsd.exe
/
searches
/
jsref.xml
< prev
next >
Wrap
Text File
|
2002-09-10
|
7KB
|
171 lines
<search function="jsref">
<name>Javascript reference</name>
<description>Search references of various flavors of Javascript.
<div class="helpboxDescLabels">Usage:</div>
<table class="helpboxDescTable">
<tr><td>jsref <<i>item</i>> [/<i>reference</i>] [/unlucky]<br/>
Note: if <<i>item</i>> is empty, the search leads to the appropriate reference page.
</td></tr>
</table>
<div class="helpboxDescLabels">Switches:</div>
<table class="helpboxDescTable">
<tr><td>/<i>reference</i></td><td> - </td><td>Search one of the following references:</td></tr>
<tr><td></td><td></td><td>
<b>The ones that use Google</b> (they take you directly to the page):<br/>
<table class="helpboxDescTable">
<tr><td>1.3</td><td> - </td><td>1.3 Netscape version</td></tr>
<tr><td>1.4</td><td> - </td><td>1.4 Netscape version</td></tr>
<tr><td>1.5</td><td> - </td><td>1.5 Netscape version</td></tr>
<tr><td><b>5.6</b></td><td> - </td><td>5.6 Microsoft version <b>(default)</b></td></tr>
<tr><td>7</td><td> - </td><td>.NET Microsoft version</td></tr>
</table>
<b>The one that uses the MS search</b>:<br/>
<table class="helpboxDescTable">
<tr><td>ms</td><td> - </td><td>Microsoft's latest version</td></tr>
</table>
</td></tr>
<tr><td>/unlucky</td><td> - </td><td>Try this if you feel unlucky (only for Google-based switches)</td></tr>
</table>
<div class="helpboxDescLabels">Examples:</div>
<table class="helpboxDescTable">
<tr><td>jsref /1.3</td></tr>
<tr><td>jsref split</td></tr>
<tr><td>jsref split /1.5</td></tr>
<tr><td>jsref split /7</td></tr>
<tr><td>jsref logical or /unlucky</td></tr>
<tr><td>jsref abstract /7</td></tr>
<tr><td>jsref abstract /ms</td></tr>
<tr><td>jsref /1.3</td></tr>
</table>
</description>
<link>http://developer.netscape.com/docs/manuals/javascript.html</link>
<category>Computers</category>
<contributor>MLL, from jdk.xml</contributor>
<form name="jsreff_gg" action="http://www.google.com/search" method="get">
<input type="hidden" name="q"/>
<input type="hidden" name="meta" value=""/>
<input type="hidden" name="btnI" value="I'm Feeling Lucky"/>
</form>
<form name="jsreff_ggul" action="http://www.google.com/search" method="get">
<input type="hidden" name="q"/>
<input type="hidden" name="meta" value=""/>
</form>
<form name="jsreff_ms"
method="get"
action="http://search.microsoft.com/default.asp">
<input type="hidden" name="so" value="RECCNT" />
<input type="hidden" name="siteid" value="us/dev" />
<input type="hidden" name="p" value="1" />
<input type="hidden" name="nq" value="NEW" />
<input type="hidden" name="qu" value="" />
<input type="hidden" name="boolean" value="ALL" />
<input type="hidden" name="ig" value="02" />
<input type="hidden" name="i" value="60" />
</form>
<script><![CDATA[
// Uses Google I'm feeling lucky search
function jsref(q)
{
var defpage = 'http://msdn.microsoft.com/library/en-us/script56/html/js56jslrfjscriptlanguagereference.asp';
if (q == "")
openSearchWindow(defpage);
else
{
var args = parseArgs(q, "1.3, 1.4, 1.5, 5.6, 7, ms, unlucky");
if( args.q == "?" ) return nullArgs( "jsref", "?" );
var myform = document.jsreff_gg;
var myfield = myform.q;
var ul = false, ms=false
/*
we somehow shoot in the dark here. putting args.q in a inurl operator would be much better,
but google doesn't accept "inurl:mychars" if mychars aren't a *complete* dir/file name
the required words 'jscript' 'requirements' seem to bring the most appropriate URL to 1st rank
the query below may be fine-tuned somewhat more
*/
var query = args.q + ' jscript requirements inurl:"script56" site:msdn.microsoft.com';
if (args.switches.length > 0)
{
var k=0;
for( var j=0; j<args.switches.length; j++ )
{
switch (args.switches[j].name)
{
case "unlucky":
ul = true;
myform = document.jsreff_ggul;
myfield = myform.q;
break;
case "1.3":
k++;
defpage = 'http://developer.netscape.com/docs/manuals/js/client/jsref/index.htm';
query = args.q + ' inurl:jsref -inurl:ix -inurl:whatsnew site:developer.netscape.com';
break;
case "1.4":
k++;
defpage = 'http://developer.netscape.com/docs/manuals/js/core/jsref14/index.htm';
query = args.q + ' inurl:jsref14 -inurl:ix site:developer.netscape.com';
break;
case "1.5":
k++;
defpage = 'http://developer.netscape.com/docs/manuals/js/core/jsref15/contents.html';
query = args.q + ' inurl:jsref15 -inurl:ix site:developer.netscape.com';
break;
case "5.6":
k++;
//we don't change anything : default search - political choice <g>
break;
case "7":
k++;
defpage = 'http://msdn.microsoft.com/library/en-us/jscript7/html/jsoriProgrammingWithJScriptNET.asp';
/*
we somehow shoot in the dark here. putting args.q in a inurl operator would be much better,
but google doesn't accept "inurl:mychars" if mychars aren't a *complete* dir/file name
the required words 'jscript' 'requirements' seem to bring the most appropriate URL to 1st rank
the query below may be fine-tuned somewhat more
*/
var query = args.q + ' jscript requirements inurl:"jscript7" site:msdn.microsoft.com';
break;
case "ms":
k++;
ms = true;
defpage = 'http://msdn.microsoft.com/library/default.asp';
query = args.q;
myform = document.jsreff_ms;
myfield = myform.qu
break;;
default:
nullArgs ( "jsref" , "?" );
return false;
} //switch
} //for
if( k > 1 || (ul && ms) )
{
nullArgs ( "jsref" , "?" );
return false;
}
} //if
if (args.q == "")
{
openSearchWindow(defpage);
return;
}
myfield.value = query;
submitForm(myform);
}
}
]]></script>
<copyright>
Copyright (c) 2002 David Bau
Distributed under the terms of the
GNU Public License, Version 2 (http://www.gnu.org/copyleft/gpl.txt)
</copyright>
</search>